#ifndef FORM_LEGEND_DLG_H
#define FORM_LEGEND_DLG_H

#include <QWidget>
#include <QApplication>

// add necessary includes here
#include "ui/defines/global.h"

class QCheckBox;

namespace Ui {
class FormLegendDialog;
}

class FormLegendDialog : public QWidget
{
    Q_OBJECT

public:
    // The default constructor
    explicit FormLegendDialog(QWidget *parent = nullptr);

    // The default destructor
    virtual ~FormLegendDialog();

protected:
    // Triggers an event before it is switch language
    void changeEvent(QEvent *event);

signals:
    void signalRefreshUI(int nChartType, int nChartAttribute, QStringList lstAxisRange);

    // Confirm to do it
    void signalReplayInfo(int nChartType, int nChartAttribute, int nLedFlag, QStringList lstAxisRange);

private slots:
    // Save data after click the button
    void on_pushButton_Confirm_clicked();

    // Close the window after click the button
    void on_pushButton_Cancel_clicked();

    // Display window
    void slotRefreshUI(int nChartType, int nChartAttribute, QStringList lstAxisRange);

private:
    // After constructing object, initialize the object
    void _initialze();

    // Init the window style
    void _initUi();

    void _checkBoxStateChanged(int nHoleIdx, bool bChecked);

private:
    Ui::FormLegendDialog *ui;

    int                             m_nChartType = 0;
    int                             m_nChartAttr = 0;
};

#endif // FORM_LEGEND_DLG_H
